﻿using System;
using System.Collections.Generic;
using System.Text;
using ArlesInterfaces.Editor;

namespace Arles.src.controller
{
    public abstract class Command<T> : ICommand
    {
        protected T receiver;
        string label;
        int imageIndex;

        public string Label
        {
            get { return label; }
            set { label = value; }
        }

        public int ImageIndex
        {
            get { return imageIndex; }
            set { imageIndex = value; }
        }

        public Command(T receiver) : this(receiver, "") { }
        public Command(T receiver, string label) : this(receiver, label, 0) { }

        public Command(T receiver, string label, int imageIndex)
        {
            this.receiver = receiver;
            this.label = label;
            this.imageIndex = imageIndex;
        }

        public abstract void Execute();

        public abstract void Undo();

        public abstract string toString();
    }
}
